package com.hunliji.monitor.web.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
@Data
public class FeishuIssuePushConfig {

    @Value("${issue.push.robot.detail.url:https://project.feishu.cn/hunliji/issue/detail/}")
    private String detailUrl;

    @Value("${issue.push.robot.begin.url:https://dev-api.hunliji.com/hms/hljMonitorServer/appApi/feishu/interception/delayCancel?workItemId={{workItemId}}&type={{type}}}")
    private String beginUrl;

    @Value("${issue.push.robot.create.template:{\"elements\":[{\"tag\":\"div\",\"text\":{\"content\":\"缺陷内容：{{content}}\\n缺陷等级：{{level}}\\n缺陷状态：{{status}}\\n请在5分钟之内开始跟进，未跟进后续会进行电话通知<at id={{userId}}></at>\",\"tag\":\"lark_md\"}},{\"actions\":[{\"tag\":\"button\",\"text\":{\"content\":\"查看缺陷详情\",\"tag\":\"lark_md\"},\"url\":\"{{detailUrl}}\",\"type\":\"default\",\"value\":{}},{\"tag\":\"button\",\"text\":{\"content\":\"开始跟进\",\"tag\":\"lark_md\"},\"url\":\"{{beginUrl}}\",\"type\":\"default\",\"value\":{}}],\"tag\":\"action\"}],\"header\":{\"title\":{\"content\":\"新的飞书缺陷已经生成\",\"tag\":\"plain_text\"}}}}")
    private String createTemplate;

    @Value("${issue.push.robot.update.state.template:{\"elements\":[{\"tag\":\"div\",\"text\":{\"content\":\"缺陷内容：{{content}}\\n缺陷等级：{{level}}\\n缺陷状态：{{status}}\\n请在2小时之内确认，未跟进后续会进行电话通知<at id={{userId}}></at>\",\"tag\":\"lark_md\"}},{\"actions\":[{\"tag\":\"button\",\"text\":{\"content\":\"查看缺陷详情\",\"tag\":\"lark_md\"},\"url\":\"{{detailUrl}}\",\"type\":\"default\",\"value\":{}},{\"tag\":\"button\",\"text\":{\"content\":\"确认变更\",\"tag\":\"lark_md\"},\"url\":\"{{followUrl}}\",\"type\":\"default\",\"value\":{}}],\"tag\":\"action\"}],\"header\":{\"title\":{\"content\":\"缺陷状态变更\",\"tag\":\"plain_text\"}}}}")
    private String updateStateTemplate;

    @Value("${issue.push.robot.view.id:JbCaGZKnRz}")
    private String issueViewId;

    @Value("${issue.push.robot.chat.id:oc_7ee630fb4de796f551e861462827192d}")
    private String chatId;

    @Value("${issue.push.robot.user.open.ids:ou_7e6fffd119dbae3e4a44a585119117fd}")
    private String userOpenIds;

    @Value("${issue.push.robot.operator.testIds.open.ids:7195114038064398339,7152532929715896348,7242096380720742404,7088155339601788930}")
    private String operatorTestIds;


}
